package com.qianli.user.domain.facatory;

import com.qianli.user.domain.model.UserAuthModel;
import com.qianli.user.domain.model.auth.Customer;
import com.qianli.user.domain.respository.UserAuthRespository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * name:认证信息
 * auth:ting.li@qianli-inc.com
 * date:2018/1/2 15:45
 * version: v1.0.0
 **/
@Service
public class UserAuthFactory {

    @Autowired
    private UserAuthRespository userAuthRespository;
    /**
     * 加载模型
     * @param userAuthModel
     */
    public void load(UserAuthModel userAuthModel) {
        userAuthRespository.load(userAuthModel);
    }

    public void store(UserAuthModel userAuthModel){

        userAuthRespository.store(userAuthModel);
    }

    public Customer getCustomerByIdentityNo(String identityNo){
        return userAuthRespository.getCustomerByIdentityNo(identityNo);
    }
}
